package edzis.translatebuddy.model {
	
	import fl.data.DataProvider;
	import org.puremvc.as3.multicore.interfaces.IProxy;
	import org.puremvc.as3.multicore.patterns.proxy.Proxy;
	
	
	[Bindable]
	public class AppProxy extends Proxy implements IProxy {
	
		public static const NAME:String = "AppProxy";
		
		public static const CHOSE_SESSION			:String = "choseSession";
		public static const ADD_WORD				:String = "addWord";
		public static const ADD_TRANSLATION			:String = "addTranslation";
		public static const WATCH_WORDS				:String = "watchWords";
		public static const MANAGE_SEARCH_PROFILES	:String = "manageSearchProfiles";
		public static const DICTIONARY				:String = "dictionary";
		
		public static const APP_STATE_CHANGE	:String = "onAppStateChange";
		
		private var _appState		:String;
		private var _navData		:DataProvider;



		public function AppProxy() {
			super(NAME, null );
			_navData = new DataProvider([
				{ label:"Session", data:CHOSE_SESSION },
				{ label:"Add Word", data:ADD_WORD },
				{ label:"Add Translation", data:ADD_TRANSLATION },
				{ label:"Watch Words", data:WATCH_WORDS },
				{ label:"Search Profiles", data:MANAGE_SEARCH_PROFILES }
			//	{ label:"Dictionary", data:DICTIONARY }
			]);
		}
		
		public function get appState():String { return _appState; }
		
		public function set appState(value:String):void {
			ArthropodDebug.log("appState to " + value);
			_appState = value;
			sendNotification(APP_STATE_CHANGE, _appState);
		}
		
		public function get navData():DataProvider { return _navData; }
		
		public function set navData(value:DataProvider):void {
			_navData = value;
		}
	
		
	}
}